import type { App } from 'vue';
import { setupRouter } from '@/router';
import { setupStores } from '@/stores';
import { setupPermission } from './permission';
import { setupSigninModal } from '@/components/signin/index';

interface PluginOptions {
    install(app: App<Element>): void;
}

class AppPlugin implements PluginOptions {
    public install(app: App<Element>): void {
        setupRouter(app);
        setupStores(app);
        setupPermission();
        setupSigninModal(app);
    }
}

export default new AppPlugin();